﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FundRaising.BLL;
using FundRaising.DAL;

namespace FundRaising.GUI.Extensions
{
    public partial class RequestArchive : System.Web.UI.Page
    {

        RequestBLL BLL = new RequestBLL();
        public static Guid ConvKey;
        DAL._FR_DS.RequestDataTable table = new _FR_DS.RequestDataTable();

        protected void Page_Load(object sender, EventArgs e)
        {
            //ridView1.
            table = BLL.GetRequestByKey();
            FundLabel.Text = Convert.ToString(table[0][3]);
            AssoLabel.Text = Convert.ToString(table[0][1]);
            DomainLabel.Text = Convert.ToString(table[0][2]);
            RequestKey.Text = Convert.ToString(table[0][11]);
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {   
            DataKeyArray keyValues = GridView1.DataKeys;


            int a1 = GridView1.SelectedIndex;
            ConvKey = new Guid(keyValues[a1].Value.ToString());
        }

        protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
        {
            Response.Redirect("RequestArchive.aspx");
        }
    }
}
